<template>
  <div class="404">
    <div class="flex flex-col items-center justify-center h-screen">
      <h1 class="text-3xl">404</h1>
      <p>{{ countdown }} seconds after the jump...</p>
    </div>
  </div>
</template>

<script lang="ts" setup name="404">
import { ref } from 'vue'
import router from '@/router'

const countdown = ref(3)

const countdownInterval = setInterval(() => {
  countdown.value -= 1
  if (countdown.value === 0) {
    clearInterval(countdownInterval)
    router.push('/')
  }
}, 1000)
</script>

<style lang="scss">
@import './index.scss';
</style>
